package com.oto.message;

/**
 * @author xueqiang.mi
 * @since 2011-1-9
 */
public class Response extends AbstractMessage {
	private static final long serialVersionUID = -3810198463574962213L;

	public static final int RST_OK = 0;
	public static final int RST_ERROR = 1;
	public static final int RST_SERVICE_UNAVAILABLE = 2;

	private int result;
	private String message;

	/**
	 * <pre>
	 * 处理结果：
	 * Response.RST_OK-成功，Response.RST_ERROR-错误，Response.RST_SERVICE_UNAVAILABLE-服务不可用
	 * </pre>
	 */
	public int getResult() {
		return result;
	}

	public void setResult(int result) {
		this.result = result;
	}

	/**
	 * 响应消息内容：可能是错误信息，或其他附加信息、备注等
	 * 
	 * @return 消息内容
	 */
	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	@Override
	public String toString() {
		return "Response [message=" + message + ", result=" + result + "]";
	}
}
